<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>{% block title %}校园美食查询系统{% endblock %}</title>
    <link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
</head>
<body>
    <div class="container">
        <header class="header">
            <h1><i class="icon">🍽️</i> 校园美食查询系统</h1>
            <nav class="nav">
                <a href="{{ url_for('index') }}">首页</a>
                {% if session.username %}
                    <span>欢迎，{{ session.username }}</span>
                    <a href="{{ url_for('logout') }}">退出</a>
                {% else %}
                    <a href="{{ url_for('login') }}">登录</a>
                    <a href="{{ url_for('register') }}">注册</a>
                {% endif %}
            </nav>
        </header>

        <main class="main">
            {% block content %}{% endblock %}
        </main>

        <footer class="footer">
            <p>© 2024 校园美食查询系统</p>
        </footer>
    </div>
</body>
</html>